const Rect = function ({ width = 0, height = 0, color = '#ffffff', x = 0, y = 0 }) {
  this.width = width
  this.height = height
  this.color = color
  this.x = x
  this.y = y
}

Rect.prototype.render = function (ctx) {
  console.log(ctx)
  const { width, height, color, x, y } = this
  ctx.fillStyle = color
  ctx.fillRect(x, y, width, height)
}

export default Rect
